package com.prs.crm.action.crm;

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;
import org.courser.ui.PaginationSupport;
import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Restrictions;

import com.prs.crm.action.ReportAction;
import com.prs.crm.annotation.Clew;
import com.prs.crm.domain.crm.Dispatch;
import com.prs.crm.domain.crm.DispatchBook;
import com.prs.crm.domain.crm.DispatchPerson;
import com.prs.crm.domain.crm.Recodhaifen;
import com.prs.crm.domain.crm.mainBill;
import com.prs.crm.report.ExportConfig;
import com.prs.crm.report.ReportCell;
import com.prs.crm.report.ReportTable;
import com.prs.crm.service.crm.DispatchBookService;
import com.prs.crm.service.crm.DispatchPersonService;
import com.prs.crm.service.crm.DispatchService;
import com.prs.crm.service.crm.RecodhaifenService;

/**
 * 针对海风查询的Action
 * 
 */
@SuppressWarnings("rawtypes")
public class DispatchSerchAction extends ReportAction {

	private static final long serialVersionUID = 1L;
	private Dispatch dispatch;
	private String nextNum = "1";
	private String judNext = "1";
	private String nextBookJudge = "";
	private List<Dispatch> disNexListaLL = new ArrayList<Dispatch>();
	private List<Dispatch> disListaLL;
	private DispatchService dispatchService;
	private DispatchPerson dispatchPerson;
	private DispatchPersonService dispatchPersonService;
	private DispatchBook dispatchBook;
	private List<DispatchBook> disBOOKListaLL;
	private List<DispatchBook> disBOOKListaLL2 = new ArrayList<DispatchBook>();
	private List<DispatchBook> disBOOKListaLL1 = new ArrayList<DispatchBook>();
	private DispatchBookService dispatchBookService;
	private Recodhaifen recodhaifen;
	private RecodhaifenService recodhaifenService;
	private mainBill mainBill;
	private String disByName;
	private String adrss = "";
	private String Tidate = "";
	private String judge = "";
	private int judgepage=1;
	private String rowdata;
	private int dispatchId = 0;
	private int starsx = 0;
	private int starsxx = 0;
	private String hidDtime;
	private int judgeNexV = 0;
	/**
	 * 后续大小
	 */
	@SuppressWarnings("unchecked")
	private List<Dispatch> hxlist = new ArrayList();

	private String billNum;
	/**
	 * 页面
	 */
	private String pagenum = "1";
	/**
	 * 页面递增
	 */
	private String pageNex = "1";

	/**
	 * 查询条件
	 * 
	 * @return
	 */
	private String conditionA = "";
	private String conditionB = "";
	private String conditionC = "";

	private String pay1 = "";
	private String pay2 = "";
	private String pay3 = "";
	private String pay1s = "";
	private String pay2s = "";
	private String pay3s = "";
	private String pay3saLL = "";
	private String allPay = "";
	private String SerA = "";
	private PaginationSupport pagination;
	// 修改的数据属性
	private Integer[] ids;
	private String[] transportCodes;
	private String[] receivePersons;
	private String[] telepones;
	private String[] productNames;
	private String[] productNums;
	private String[] agancyFunds;
	private String[] submitFunds;
	private String[] paidFunds;
	private String[] conterpartFunds;
	private String[] anotherPersons;

	@SuppressWarnings("unchecked")
	@Action("viewAllDispatch")
	public String viewAllDispatch() {

		/**
		 * 查询出当前数据库所有的改编号的数据值
		 */
		disListaLL = this.getDispatchService().getNumToDispatch(billNum);
		int disSize = disListaLL.size();
		/**
		 * 说明有数据
		 */
		if (disSize != 0) {
			if (judge != "") {
				pagenum = (Integer.parseInt(judge) + 1) + "";
			}

			// System.out.println("查询=" + billNum + ":" + pagenum);
			/**
			 * 根据页码和编号查找数据值
			 */

			pay1s=disListaLL.get(disListaLL.size()-1).getAllPay1();
			pay2s=disListaLL.get(disListaLL.size()-1).getAllPay2();
			pay3s=disListaLL.get(disListaLL.size()-1).getAllPay3();
			pay3saLL=disListaLL.get(disListaLL.size()-1).getAlltotalPay();
			disListaLL = this.getDispatchService().getNumpageToDispatch(
					billNum, pagenum);
			// System.out.println("输出大小=" + disListaLL.size());
			disNexListaLL = disListaLL;
			double pays1 = 0.0;
			double pays2 = 0.0;
			double pays3 = 0.0;
			for (int x = 0; x < disNexListaLL.size(); x++) {
				pays1 = pays1 + disNexListaLL.get(x).getSubmitFund();
				pays2 = pays2 + disNexListaLL.get(x).getPaidFund();
				pays3 = pays3
						+ disNexListaLL.get(x).getConterpartFund();
			}
			
			pay1 = pays1 + "";
			pay2 = pays2 + "";
			pay3 = pays3 + "";
			allPay = (pays1 + pays2 + pays3) + "";
			pageNex = disNexListaLL.get(0).getDispageNum();
			adrss = disNexListaLL.get(0).getTransportAddress();
			String Tidate1 = disNexListaLL.get(0).getTransportDate()
					+ "";
			String Tidates[] = Tidate1.split(" ");
			Tidate = setDates(Tidates[0]);
			//////////////////////
			if (disSize < 24) {
//				disNexListaLL = disListaLL;

				for (int i = 0; i> disSize-24 ; i--) {
					Dispatch disp=new Dispatch();
					disp.setId(i);
					hxlist.add(disp);
				}

			} else if (disSize == 24) {
//				pay1s=disNexListaLL.get(0).getAllPay1();
//				pay2s=disNexListaLL.get(0).getAllPay2();
//				pay3s=disNexListaLL.get(0).getAllPay3();
//				pay3saLL=disNexListaLL.get(0).getAlltotalPay();
//				pay1 = pays1 + "";
//				pay2 = pays2 + "";
//				pay3 = pays3 + "";
//				allPay = (pays1 + pays2 + pays3) + "";
//				pageNex = disNexListaLL.get(0).getDispageNum();
//				adrss = disNexListaLL.get(0).getTransportAddress();
//				String Tidate1 = disNexListaLL.get(0).getTransportDate() + "";
//				String Tidates[] = Tidate1.split(" ");
//				Tidate = setDates(Tidates[0]);
			} else {
				/**
				 * 大于disSize
				 */	
				if (Integer.parseInt(pagenum) <= 1) {
					judgeNexV = 2;
				} else {
					if (disListaLL.size() <= 24) {

						judgeNexV = 0;
						
						for (int i = 0; i > disListaLL.size()-24; i--) {
							Dispatch disp=new Dispatch();
							disp.setId(i);
							hxlist.add(disp);
						}
					}
				}

			}
		}
		int dqpage = 0;
		int yu = 0;
		int zus = 0;
		if (disSize > 24) {
			yu = disSize % 24;
			zus = disSize / 24;
			if (yu > 0) {
				dqpage = zus + 1;
			} else {
				dqpage = zus;
			}
		} else {
			dqpage = 1;
		}
		if (Integer.parseInt(pageNex) == dqpage) {
			starsx = 1;
			List<Dispatch>  klist=this.getDispatchService().getNumpageToDispatch(billNum, pageNex);
			if(klist.size()==24){
				starsxx=1;
				judgepage=dqpage+1;
			}
		
		}else{
			starsx = 3;
		}

		disBOOKListaLL = this.getDispatchBookService().getNumToDispatchBook(
				billNum);

		return SUCCESS;
	}

	@SuppressWarnings("unchecked")
	@Action("viewAllDispatchBook")
	public String viewAllDispatchBook() {

		disBOOKListaLL = this.getDispatchBookService().getNumToDispatchBook(
				billNum);
		int sizeB = disBOOKListaLL.size();
		// System.out.println("sizeB="+sizeB);

		/**
		 * 第一次,未翻页
		 */

		if (sizeB > 24) {
			int netxNumV = Integer.parseInt(nextNum);
			// System.out.println("值的大小="+netxNumV);
			if (Integer.parseInt(nextNum) == 1) {
				for (int i = 0; i < 24; i++) {
					disBOOKListaLL1.add(disBOOKListaLL.get(i));
				}
				judNext = "2";
				nextNum = (netxNumV + 1) + "";
			} else {

				int startV = 24 * (netxNumV - 1);
				// System.out.println("startV="+startV);
				int maxV_1 = startV + 24;
				if (sizeB - maxV_1 < 0) {

					for (int i = startV; i < sizeB; i++) {
						disBOOKListaLL1.add(disBOOKListaLL.get(i));
					}
					for (int z = 0; z < 24 - (maxV_1 - sizeB); z++) {
						Dispatch disp2=new Dispatch();
						disp2.setId(z);
						hxlist.add(disp2);
					}
					judNext = "0";
					nextNum = (netxNumV + 1) + "";
				} else {
					for (int i = startV; i < startV + 24; i++) {
						disBOOKListaLL1.add(disBOOKListaLL.get(i));
					}
					judNext = "2";
					nextNum = (netxNumV + 1) + "";

				}

			}

		} else if (sizeB == 24) {
			disBOOKListaLL1 = disBOOKListaLL;
		} else if (sizeB < 24) {
			disBOOKListaLL1 = disBOOKListaLL;
			for (int z = 0; z < 24 - sizeB; z++) {
				Dispatch disp=new Dispatch();
				disp.setId(z);
				hxlist.add(disp);
			}
		}
		return SUCCESS;
	}

	@Action("queryCondition")
	public String queryCondition() {
		return SUCCESS;
	}

	@SuppressWarnings("unchecked")
	@Action("viewDispatchByName")
	public String viewDispatchByName() {
		/**
		 * 找出姓名
		 */
		DispatchPerson dispo = this.getDispatchPersonService().get(
				dispatchPerson.getId());
		/**
		 * 姓名
		 */
		disByName = dispo.getPeName();
		/**
		 * 地址
		 */
		adrss = dispo.getPeAdress();
		DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
		String hidDtimex = df.format(new Date());
		String dates[] = hidDtimex.split("-");
		hidDtime = dates[0] + "年" + dates[1] + "月" + dates[2] + "日";

		if ("".equals(judge) || judge == null) {
			pageNex = "1";
		} else {
			pageNex = (Integer.parseInt(pageNex) + 1) + "";
		}
		disListaLL = this.getDispatchService().getByNameandByAdress(disByName,
				adrss);
		int forSize = disListaLL.size();
		if (forSize == 24) {
			disNexListaLL = disListaLL;
			double pays1 = 0.0;
			double pays2 = 0.0;
			double pays3 = 0.0;
			double Allpays = 0.0;
			for (int i = 0; i < disNexListaLL.size(); i++) {
				pays1 = pays1 + disNexListaLL.get(i).getSubmitFund();
				pays2 = pays2 + disNexListaLL.get(i).getPaidFund();
				pays3 = pays3 + disNexListaLL.get(i).getConterpartFund();
			}
			Allpays = pays1 + pays2 + pays3;
			pay1 = pays1 + "";
			pay2 = pays2 + "";
			pay3 = pays3 + "";
			allPay = Allpays + "";
		} else if (forSize < 24) {
			disNexListaLL = disListaLL;
			for (int i = 0; i < 24 - forSize; i++) {
				Dispatch disp=new Dispatch();
				disp.setId(i);
				hxlist.add(disp);
			}
			double pays1 = 0.0;
			double pays2 = 0.0;
			double pays3 = 0.0;
			double Allpays = 0.0;
			for (int i = 0; i < disNexListaLL.size(); i++) {
				pays1 = pays1 + disNexListaLL.get(i).getSubmitFund();
				pays2 = pays2 + disNexListaLL.get(i).getPaidFund();
				pays3 = pays3 + disNexListaLL.get(i).getConterpartFund();
			}
			Allpays = pays1 + pays2 + pays3;
			pay1 = pays1 + "";
			pay2 = pays2 + "";
			pay3 = pays3 + "";
			allPay = Allpays + "";

		} else if (forSize > 24) {

			dispatchId = dispatchPerson.getId();
			/**
			 * 第一次，未进行翻页
			 */
			if (pageNex != "" && judge == "") {
				for (int i = 0; i < 24; i++) {
					disNexListaLL.add(disListaLL.get(i));
				}
				double pays1 = 0.0;
				double pays2 = 0.0;
				double pays3 = 0.0;
				double Allpays = 0.0;
				for (int i = 0; i < disNexListaLL.size(); i++) {
					pays1 = pays1 + disNexListaLL.get(i).getSubmitFund();
					pays2 = pays2 + disNexListaLL.get(i).getPaidFund();
					pays3 = pays3 + disNexListaLL.get(i).getConterpartFund();
				}
				Allpays = pays1 + pays2 + pays3;
				pay1 = pays1 + "";
				pay2 = pays2 + "";
				pay3 = pays3 + "";
				allPay = Allpays + "";
				SerA = pays1 + "," + pays2 + "," + pays3;
				judgeNexV = 1;
			} else {

				int judf = Integer.parseInt(pageNex) - 1;
				int maxV = (judf * 24) + 24;
				if ((forSize - maxV) < 0) {
					maxV = judf * 24 + (maxV - forSize);
					for (int i = judf * 24; i < forSize; i++) {
						disNexListaLL.add(disListaLL.get(i));
					}
					for (int i = 0; i < maxV - forSize; i++) {
						Dispatch disp=new Dispatch();
						disp.setId(i);
						hxlist.add(disp);
					}

					double pays1 = 0.0;
					double pays2 = 0.0;
					double pays3 = 0.0;
					double Allpays = 0.0;
					for (int i = 0; i < disNexListaLL.size(); i++) {
						pays1 = pays1 + disNexListaLL.get(i).getSubmitFund();
						pays2 = pays2 + disNexListaLL.get(i).getPaidFund();
						pays3 = pays3
								+ disNexListaLL.get(i).getConterpartFund();
					}
					Allpays = pays1 + pays2 + pays3;
					pay1 = pays1 + "";
					pay2 = pays2 + "";
					pay3 = pays3 + "";
					allPay = Allpays + "";
					SerA = pays1 + "," + pays2 + "," + pays3;
					judgeNexV = 0;
				} else {

					for (int i = (judf - 1) * 24; i < maxV; i++) {
						disNexListaLL.add(disListaLL.get(i));
					}
					double pays1 = 0.0;
					double pays2 = 0.0;
					double pays3 = 0.0;
					double Allpays = 0.0;
					for (int i = 0; i < disNexListaLL.size(); i++) {
						pays1 = pays1 + disNexListaLL.get(i).getSubmitFund();
						pays2 = pays2 + disNexListaLL.get(i).getPaidFund();
						pays3 = pays3
								+ disNexListaLL.get(i).getConterpartFund();
					}
					Allpays = pays1 + pays2 + pays3;
					pay1 = pays1 + "";
					pay2 = pays2 + "";
					pay3 = pays3 + "";
					allPay = Allpays + "";
					SerA = pays1 + "," + pays2 + "," + pays3;
				}

			}
		}
		dispatchId = dispatchPerson.getId();
		/**
		 * 账簿查询
		 */

		disBOOKListaLL = this.getDispatchBookService()
				.getBookToByNameandByAdress(disByName, adrss);

		return SUCCESS;
	}

	@SuppressWarnings("unchecked")
	@Action("viewDispatchBookByName")
	public String viewDispatchBookByName() {
		/**
		 * 找出姓名
		 */
		DispatchPerson dispo = this.getDispatchPersonService().get(
				dispatchPerson.getId());
		/**
		 * 姓名
		 */
		disByName = dispo.getPeName();
		/**
		 * 地址
		 */
		adrss = dispo.getPeAdress();

		disBOOKListaLL = this.getDispatchBookService()
				.getBookToByNameandByAdress(disByName, adrss);
		int judSize = disBOOKListaLL.size();
		if (judSize == 24) {
			disBOOKListaLL2 = disBOOKListaLL;
			judNext = "1";
		} else if (judSize < 24) {
			disBOOKListaLL2 = disBOOKListaLL;
			for (int i = 0; i < 24 - judSize; i++) {
				Dispatch disp=new Dispatch();
				disp.setId(i);
				hxlist.add(disp);
			}
			judNext = "1";
		} else {

			// System.out.println("judgeNexV="+judgeNexV);

			int startV = judgeNexV * 24;
			int maxV = startV + 24;

			if (judSize - maxV < 0) {
				for (int i = startV; i < judSize; i++) {
					disBOOKListaLL2.add(disBOOKListaLL.get(i));
				}
				for (int i = 0; i < maxV - judSize; i++) {
					Dispatch disp=new Dispatch();
					disp.setId(i);
					hxlist.add(disp);
				}
			} else {
				for (int i = startV; i < maxV; i++) {
					disBOOKListaLL2.add(disBOOKListaLL.get(i));
				}
				judNext = "2";
			}

			judgeNexV = judgeNexV + 1;
		}

		return SUCCESS;
	}

	/**
	 * 根据输入条件查询
	 * 
	 * @return
	 */
	@Action("listSerchDispatch")
	public String listSerchDispatch() {
		DetachedCriteria criteria = this.getPaginationHelper().createQuery(
				Dispatch.class);
		if ("".equals(conditionA)) {
		} else {
			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
			Date date = null;
			try {
				date = sdf.parse(conditionA);
			} catch (ParseException e) {

				e.printStackTrace();
			}
			criteria.add(Restrictions.eq("transportDate", date));
		}
		if ("".equals(conditionB)) {
		} else {
			criteria.add(Restrictions.eq("transportAddress", conditionB));
		}
		if ("".equals(conditionC)) {
		} else {
			criteria.add(Restrictions.eq("receivePerson", conditionC));
		}
		pagination = this.getPaginationHelper().prepare(pagination);
		this.setPagination(this.getDispatchService().listByPage(criteria,
				pagination));
		return SUCCESS;

	}

	@Action("listSerchDispatchBook")
	public String listSerchDispatchBook() {
		DetachedCriteria criteria = this.getPaginationHelper().createQuery(
				DispatchBook.class);
		if ("".equals(conditionA)) {
		} else {
			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
			Date date = null;
			try {
				date = sdf.parse(conditionA);
			} catch (ParseException e) {

				e.printStackTrace();
			}
			criteria.add(Restrictions.eq("boDate", date));
		}
		if ("".equals(conditionB)) {
		} else {
			criteria.add(Restrictions.eq("boAdress", conditionB));
		}
		if ("".equals(conditionC)) {
		} else {
			criteria.add(Restrictions.eq("boName", conditionC));
		}
		pagination = this.getPaginationHelper().prepare(pagination);
		this.setPagination(this.getDispatchBookService().listByPage(criteria,
				pagination));
		return SUCCESS;

	}

	/**
	 * 查询当天单据
	 * 
	 * @return
	 */
	@Action("listCurentTime")
	public String listCurentTime() {
		DetachedCriteria criteria = this.getPaginationHelper().createQuery(
				mainBill.class);
		DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
		String Dtime1 = df.format(new Date()) + "";

		criteria.add(Restrictions.eq("currentTime", Dtime1));
		pagination = this.getPaginationHelper().prepare(pagination);
		this.setPagination(this.getDispatchBookService().listByPage(criteria,
				pagination));

		return SUCCESS;
	}

	@Action(value = "exportReportShipping", results = { @Result(name = "success", type = "stream", params = {
			"contentType", "${contentType}", "inputName", "inputStream",
			"bufferSize", "1024", "contentDisposition",
			"filename=${outfileName}" }) })
	public String exportReportShipping() {

		ReportTable table = new ReportTable("海风运输有限责任公司");
		table.addCell(new ReportCell("货号", "transportCode"));
		table.addCell(new ReportCell("收货人姓名", "receivePerson"));
		table.addCell(new ReportCell("联系电话", "telepone"));
		table.addCell(new ReportCell("品名", "productName"));
		table.addCell(new ReportCell("数量", "productNum"));
		table.addCell(new ReportCell("代收款", "agancyFund"));
		table.addCell(new ReportCell("提付", "submitFund"));
		table.addCell(new ReportCell("已付", "paidFund"));
		table.addCell(new ReportCell("回付", "conterpartFund"));
		table.addCell(new ReportCell("代收人签名", "anotherPerson"));
		DetachedCriteria criteria = this.getPaginationHelper().createQuery(
				Dispatch.class);

		this.setOutFilePath(this.getReportService().report(criteria, table,
				new ExportConfig(), this.getExportType()));
		return SUCCESS;
	}

	@Action("ReportExclew")
	public String ReportExclew() {

		return SUCCESS;
	}

	@Action(value = "ReportExcle", results = { @Result(name = "success", type = "json", params = {
			"root", "rowdata" }) })
	public String ReportExcle() {
		String returnNum = this.getDispatchService().setExportExcle(billNum);
		this.rowdata = returnNum;
		return SUCCESS;
	}

	@Action(value = "setModifyData", results = { @Result(name = "success", type = "json", params = {
			"root", "rowdata" }) })
	public String setModifyData() {
		
		dispatch = this.getDispatchService().get(dispatch.getId());
	
		return SUCCESS;
	}

	@Action(value = "validateAress", results = { @Result(name = "success", type = "json", params = {
			"root", "rowdata" }) })
	public String validateAress() {

		String returnNum = this.getDispatchService().getNumToDispatch(SerA)
				.get(0).getTransportAddress();
//		List<Dispatch> alist = this.getDispatchService().getNumToDispatch(SerA);
//
//		for (int i = 0; i < alist.size(); i++) {
//			System.out.println("执行到" + i + "="
//					+ alist.get(i).getTransportAddress());
//		}

		this.rowdata = returnNum;
		return SUCCESS;
	}

	public Dispatch getDispatch() {
		return dispatch;
	}

	public void setDispatch(Dispatch dispatch) {
		this.dispatch = dispatch;
	}

	public DispatchService getDispatchService() {
		return dispatchService;
	}

	public void setDispatchService(DispatchService dispatchService) {
		this.dispatchService = dispatchService;
	}

	public DispatchPerson getDispatchPerson() {
		return dispatchPerson;
	}

	public void setDispatchPerson(DispatchPerson dispatchPerson) {
		this.dispatchPerson = dispatchPerson;
	}

	public DispatchPersonService getDispatchPersonService() {
		return dispatchPersonService;
	}

	public void setDispatchPersonService(
			DispatchPersonService dispatchPersonService) {
		this.dispatchPersonService = dispatchPersonService;
	}

	public DispatchBook getDispatchBook() {
		return dispatchBook;
	}

	public void setDispatchBook(DispatchBook dispatchBook) {
		this.dispatchBook = dispatchBook;
	}

	public DispatchBookService getDispatchBookService() {
		return dispatchBookService;
	}

	public void setDispatchBookService(DispatchBookService dispatchBookService) {
		this.dispatchBookService = dispatchBookService;
	}

	public Recodhaifen getRecodhaifen() {
		return recodhaifen;
	}

	public void setRecodhaifen(Recodhaifen recodhaifen) {
		this.recodhaifen = recodhaifen;
	}

	public RecodhaifenService getRecodhaifenService() {
		return recodhaifenService;
	}

	public void setRecodhaifenService(RecodhaifenService recodhaifenService) {
		this.recodhaifenService = recodhaifenService;
	}

	public String getBillNum() {
		return billNum;
	}

	public void setBillNum(String billNum) {
		this.billNum = billNum;
	}

	public mainBill getMainBill() {
		return mainBill;
	}

	public void setMainBill(mainBill mainBill) {
		this.mainBill = mainBill;
	}

	public List<Dispatch> getDisListaLL() {
		return disListaLL;
	}

	public void setDisListaLL(List<Dispatch> disListaLL) {
		this.disListaLL = disListaLL;
	}

	public List<DispatchBook> getDisBOOKListaLL() {
		return disBOOKListaLL;
	}

	public void setDisBOOKListaLL(List<DispatchBook> disBOOKListaLL) {
		this.disBOOKListaLL = disBOOKListaLL;
	}

	public String getPagenum() {
		return pagenum;
	}

	public void setPagenum(String pagenum) {
		this.pagenum = pagenum;
	}

   

	public List<Dispatch> getHxlist() {
		return hxlist;
	}

	public void setHxlist(List<Dispatch> hxlist) {
		this.hxlist = hxlist;
	}

	public String getAdrss() {
		return adrss;
	}

	public void setAdrss(String adrss) {
		this.adrss = adrss;
	}

	public String getPageNex() {
		return pageNex;
	}

	public void setPageNex(String pageNex) {
		this.pageNex = pageNex;
	}

	public String getTidate() {
		return Tidate;
	}

	public void setTidate(String tidate) {
		Tidate = tidate;
	}

	public String getJudge() {
		return judge;
	}

	public void setJudge(String judge) {
		this.judge = judge;
	}

	public String getPay1() {
		return pay1;
	}

	public void setPay1(String pay1) {
		this.pay1 = pay1;
	}

	public String getPay2() {
		return pay2;
	}

	public void setPay2(String pay2) {
		this.pay2 = pay2;
	}

	public String getPay3() {
		return pay3;
	}

	public void setPay3(String pay3) {
		this.pay3 = pay3;
	}

	public String getAllPay() {
		return allPay;
	}

	public void setAllPay(String allPay) {
		this.allPay = allPay;
	}

	public String getDisByName() {
		return disByName;
	}

	public void setDisByName(String disByName) {
		this.disByName = disByName;
	}

	public String getConditionA() {
		return conditionA;
	}

	public void setConditionA(String conditionA) {
		this.conditionA = conditionA;
	}

	public String getConditionB() {
		return conditionB;
	}

	public void setConditionB(String conditionB) {
		this.conditionB = conditionB;
	}

	public String getConditionC() {
		return conditionC;
	}

	public void setConditionC(String conditionC) {
		this.conditionC = conditionC;
	}

	public PaginationSupport getPagination() {
		return pagination;
	}

	public void setPagination(PaginationSupport pagination) {
		this.pagination = pagination;
	}

	public String getRowdata() {
		return rowdata;
	}

	public void setRowdata(String rowdata) {
		this.rowdata = rowdata;
	}

	
	public int getJudgepage() {
		return judgepage;
	}

	public void setJudgepage(int judgepage) {
		this.judgepage = judgepage;
	}

	public String getSerA() {
		return SerA;
	}

	public void setSerA(String serA) {
		SerA = serA;
	}

	public List<DispatchBook> getDisBOOKListaLL1() {
		return disBOOKListaLL1;
	}

	public void setDisBOOKListaLL1(List<DispatchBook> disBOOKListaLL1) {
		this.disBOOKListaLL1 = disBOOKListaLL1;
	}

	public String getNextNum() {
		return nextNum;
	}

	public void setNextNum(String nextNum) {
		this.nextNum = nextNum;
	}

	public String getNextBookJudge() {
		return nextBookJudge;
	}

	public void setNextBookJudge(String nextBookJudge) {
		this.nextBookJudge = nextBookJudge;
	}

	public String getJudNext() {
		return judNext;
	}

	public void setJudNext(String judNext) {
		this.judNext = judNext;
	}

	public int getDispatchId() {
		return dispatchId;
	}

	public void setDispatchId(int dispatchId) {
		this.dispatchId = dispatchId;
	}

	public String getHidDtime() {
		return hidDtime;
	}

	public void setHidDtime(String hidDtime) {
		this.hidDtime = hidDtime;
	}

	public List<Dispatch> getDisNexListaLL() {
		return disNexListaLL;
	}

	public void setDisNexListaLL(List<Dispatch> disNexListaLL) {
		this.disNexListaLL = disNexListaLL;
	}

	public int getJudgeNexV() {
		return judgeNexV;
	}

	public void setJudgeNexV(int judgeNexV) {
		this.judgeNexV = judgeNexV;
	}

	public List<DispatchBook> getDisBOOKListaLL2() {
		return disBOOKListaLL2;
	}

	public void setDisBOOKListaLL2(List<DispatchBook> disBOOKListaLL2) {
		this.disBOOKListaLL2 = disBOOKListaLL2;
	}

	public String setDates(String date0) {
		String fg_date[] = date0.split("-");
		String fg_year = fg_date[0] + "年";
		String fg_moth = fg_date[1] + "月";
		String fg_day = fg_date[2] + "日";
		return fg_year + fg_moth + fg_day;
	}

	public Integer[] getIds() {
		return ids;
	}

	public void setIds(Integer[] ids) {
		this.ids = ids;
	}

	public String[] getTransportCodes() {
		return transportCodes;
	}

	public void setTransportCodes(String[] transportCodes) {
		this.transportCodes = transportCodes;
	}

	public String[] getReceivePersons() {
		return receivePersons;
	}

	public void setReceivePersons(String[] receivePersons) {
		this.receivePersons = receivePersons;
	}

	public String[] getTelepones() {
		return telepones;
	}

	public void setTelepones(String[] telepones) {
		this.telepones = telepones;
	}

	public String[] getProductNames() {
		return productNames;
	}

	public void setProductNames(String[] productNames) {
		this.productNames = productNames;
	}

	public String[] getProductNums() {
		return productNums;
	}

	public void setProductNums(String[] productNums) {
		this.productNums = productNums;
	}

	public String[] getAgancyFunds() {
		return agancyFunds;
	}

	public void setAgancyFunds(String[] agancyFunds) {
		this.agancyFunds = agancyFunds;
	}

	public String[] getSubmitFunds() {
		return submitFunds;
	}

	public void setSubmitFunds(String[] submitFunds) {
		this.submitFunds = submitFunds;
	}

	public String[] getPaidFunds() {
		return paidFunds;
	}

	public void setPaidFunds(String[] paidFunds) {
		this.paidFunds = paidFunds;
	}

	public String[] getConterpartFunds() {
		return conterpartFunds;
	}

	public void setConterpartFunds(String[] conterpartFunds) {
		this.conterpartFunds = conterpartFunds;
	}

	public String[] getAnotherPersons() {
		return anotherPersons;
	}

	public void setAnotherPersons(String[] anotherPersons) {
		this.anotherPersons = anotherPersons;
	}

	public int getStarsx() {
		return starsx;
	}

	public void setStarsx(int starsx) {
		this.starsx = starsx;
	}

	public String getPay1s() {
		return pay1s;
	}

	public void setPay1s(String pay1s) {
		this.pay1s = pay1s;
	}

	public String getPay2s() {
		return pay2s;
	}

	public void setPay2s(String pay2s) {
		this.pay2s = pay2s;
	}

	public String getPay3s() {
		return pay3s;
	}

	public void setPay3s(String pay3s) {
		this.pay3s = pay3s;
	}

	public String getPay3saLL() {
		return pay3saLL;
	}

	public void setPay3saLL(String pay3saLL) {
		this.pay3saLL = pay3saLL;
	}

	public int getStarsxx() {
		return starsxx;
	}

	public void setStarsxx(int starsxx) {
		this.starsxx = starsxx;
	}

}
